package com.bjpowernode.workbench.web.controller;

import com.bjpowernode.workbench.web.domain.FunnelVO;
import com.bjpowernode.workbench.web.service.impl.TranServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class WorkbenchChartController {
    @Autowired
    private TranServiceImpl tranService;

    @RequestMapping("/workbench/chart/chartTransaction.do")
    public String toChartTransaction(){
        return "workbench/chart/transaction/index";
    }

    @ResponseBody
    @RequestMapping("/workbench/chart/selectCountOfTranGroupByStage.do")
    public Object selectCountOfTranGroupByStage(){
        List<FunnelVO> funnelVOList = tranService.selectCountOfTranGroupByStage();
        return funnelVOList;
    }
}
